﻿@{
    Layout = "~/Views/Achievement/_Layout.cshtml";
}
<script type="text/javascript">
    $(function () {
        $("#uploaddoc").button();
        $(".pagelink a").click(function () {
            $(this).attr("href", $(this).attr("href") + "&key=" + $("#key").get(0).value);
        });
        $("#key").bind("blur", function () {
            if ($(this).get(0).value == null || $(this).get(0).value == "") {
                $(this).addClass("hint_blank");
                $(this).get(0).value = $(this).attr("hint");
            }
        });
        $("#key").bind("focus", function () {
            if ($(this).hasClass("hint_blank")) {
                $(this).removeClass("hint_blank");
                $(this).get(0).value = "";
            }
        });
    });
</script>
<div class="col_header">
    <div class="uploader">
        <a href="/Achievement/@ViewBag.UploadAction/@ViewBag.AchievementId" class="white" id="uploaddoc">上传文档</a>
    </div>
    <div class="search">
        <form method="get">
            @if (ViewBag.Key == null)
            {
            <input type="text" class="hint_blank ui-corner-all" id="key" name="key" hint="输入关键字" value="输入关键字"/>
            }
            else
            {
            <input type="text" class="ui-corner-all" id="key" name="key" hint="输入关键字" value="@ViewBag.Key"/>
            }
            <input type="hidden" name="id" value="@ViewBag.ProjectId" />
            <input type="hidden" name="page" value="0" />
        </form>
    </div>
</div>
<hr />
<div>
    @RenderBody()
</div>


<div class="pagelink clear">
    <ul>                      
        @if (ViewBag.PrePage == -1)
        {                     
        <li><span title="没有了">上一页</span></li>     
        }
        else
        { 
        <li><a href="/Project/DocumentList?id=@ViewBag.ProjectId&page=@ViewBag.PrePage">上一页</a></li>  
        } 
        @if (ViewBag.NextPage == -1)
        {                     
        <li><span title="没有了">下一页</span></li>    
        }
        else
        { 
        <li><a href="/Project/DocumentList?id=@ViewBag.ProjectId&page=@ViewBag.NextPage">下一页</a></li> 
        }                 
    </ul>
</div>
